package org.infodavid.common.model.impl.criteria;

import org.infodavid.common.model.IUserGroup;
import org.infodavid.common.model.criteria.IUserGroupCriteria;

/**
 * The Class UserGroupCriteriaImpl.
 */
public class UserGroupCriteriaImpl extends SortCriteriaImpl implements IUserGroupCriteria {

  /** The Constant serialVersionUID. */
  private static final long serialVersionUID = -5781804069003150073L;

  /** The name pattern. */
  private String namePattern = null;

  /** The role. */
  private IUserGroup.EUserRole role = null;

  /** The member login name pattern. */
  private String memberPattern = null;

  /**
   * The Constructor.
   */
  public UserGroupCriteriaImpl() {
    super();
  }

  /*
   * See super class or interface. (non-Javadoc)
   * @see org.infodavid.common.services.criteria.IGroupCriteria#getNamePattern()
   */
  @Override
  public String getNamePattern() {
    return namePattern;
  }

  /*
   * See super class or interface. (non-Javadoc)
   * @see org.infodavid.common.services.criteria.IGroupCriteria#setNamePattern(java.lang.String)
   */
  @Override
  public void setNamePattern(final String value) {
    namePattern = value;
  }

  /*
   * See super class or interface. (non-Javadoc)
   * @see org.infodavid.common.services.criteria.IGroupCriteria#getMemberPattern()
   */
  @Override
  public String getMemberPattern() {
    return memberPattern;
  }

  /*
   * See super class or interface. (non-Javadoc)
   * @see org.infodavid.common.services.criteria.IGroupCriteria#setMemberPattern(java.lang.String)
   */
  @Override
  public void setMemberPattern(final String value) {
    memberPattern = value;
  }

  /*
   * See super class or interface. (non-Javadoc)
   * @see org.infodavid.common.model.criteria.IGroupCriteria#getRole()
   */
  @Override
  public IUserGroup.EUserRole getRole() {
    return role;
  }

  /*
   * See super class or interface. (non-Javadoc)
   * @see
   * org.infodavid.common.model.criteria.IGroupCriteria#setRole(org.infodavid.common.model.IGroup
   * .EGroupRole )
   */
  @Override
  public void setRole(final IUserGroup.EUserRole value) {
    role = value;
  }

  /*
   * (non-Javadoc)
   * @see java.lang.Object#toString()
   */
  @Override
  public String toString() {
    final StringBuilder builder = new StringBuilder();

    builder.append(super.toString());
    builder.append("[namePattern=");
    builder.append(namePattern);
    builder.append(",role=");
    builder.append(role);
    builder.append(",memberPattern=");
    builder.append(memberPattern);
    builder.append("]");

    return builder.toString();
  }
}
